//WAP to read data from employee table
import java.sql.*;
import java.util.*;
class JdbcDemo16 {

	public static void main(String[] args) throws Exception
	{
		Class.forName("oracle.jdbc.driver.OracleDriver");
		Connection cn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","oracle");
		Statement st = cn.createStatement();
		ResultSet rs = st.executeQuery("select * from employee");
		while(rs.next())
		{
			System.out.println(rs.getInt(1)+"  "+rs.getString(2)+"  "+rs.getFloat(3));
		}
		rs.close();
		cn.close();
		st.close();
		// TODO Auto-generated method stub

	}

}
